{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "c2beb0a0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    4\n",
       "1    3\n",
       "2    5\n",
       "3    6\n",
       "4    1\n",
       "dtype: int64"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "data = pd.Series([4,3,5,6,1])\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "7a2d394c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "RangeIndex(start=0, stop=5, step=1)"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "4d0d9286",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([4, 3, 5, 6, 1], dtype=int64)"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "e83129bc",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "numpy.ndarray"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(data.values)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "22505c13",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "pandas.core.indexes.range.RangeIndex"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(data.index)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "b23b98c1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "one      5\n",
       "two      4\n",
       "three    6\n",
       "four     3\n",
       "five     1\n",
       "dtype: int64"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data=pd.Series([5,4,6,3,1],index=['one','two','three','four','five'])\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "35045ff6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'bj': 1000, 'sh': 800, 'sz': 800, 'wh': 900}"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "city_num={'bj':1000,'sh':800,'sz':800,'wh':900}\n",
    "city_num"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "f82b4a8a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "bj    1000\n",
       "sh     800\n",
       "sz     800\n",
       "wh     900\n",
       "dtype: int64"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data=pd.Series(city_num)\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "24b7ff2e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "sz    800.0\n",
       "tj      NaN\n",
       "dtype: float64"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data=pd.Series(city_num,index=['sz','tj'])\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "29ec1582",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "my_test",
   "language": "python",
   "name": "my_test"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
